const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');

const Schema = mongoose.Schema,
    ObjectId = Schema.ObjectId;

/**
 * 客户表示一个企业级用户
 * @type {mongoose.Schema}
 */
let schema = new Schema({
    mobile : String,
    mo_date : String,
    content : String,
    ext : String,
    ref : String,

    cus_id : String,
    create_time : {type : Date, default : Date.now},
    push_time : {type : Date},
    push_status : {type : Number, default : 0}, //0 = 未推送，1=推送成功，2=推送失败,
    try_times : {type : Number, default : 0},
    lock : {type : String, default : ''},
    type : Number, //1 = push ,2 = get
});

let model = mongoose.model('customer_mo', schema);

module.exports = model;
